package com.bdqn.jk;

import com.bdqn.jk.pojo.Eemanagement;
import com.sun.deploy.security.SessionCertStore;
import org.apache.ibatis.binding.MapperMethod;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

public class Main {

    public static void main(String[] args) throws IOException {
	    // write your code here
        String resource = "mybatis-config.xml";
        InputStream inputStream = Resources.getResourceAsStream(resource);
        SqlSessionFactory sqlsessionFactory=new SqlSessionFactoryBuilder().build(inputStream);
        SqlSession sqlsssion = sqlsessionFactory.openSession();
        List<Eemanagement> eem = sqlsssion.selectList("listEeManagement");
        for(Eemanagement c:eem){
            System.out.println(c);
        }

    }
}
